/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.d;

import android.content.Context;
import android.text.TextUtils;
import com.qihoo.gamecenter.sdk.common.c.d;
import java.util.ArrayList;
import org.json.JSONObject;

public class a {
    public static String a(Context paramContext, String paramString) {
        String str = com.qihoo.gamecenter.sdk.common.c.e.a(paramContext).b(paramString);
        return a(paramString, str);
    }

    public static String a(Context paramContext, String paramString1, String paramString2) {
        String str = com.qihoo.gamecenter.sdk.common.c.e.a(paramContext).a(paramString1, paramString2);
        if (!(TextUtils.isEmpty(str)))
            str = com.qihoo.gamecenter.sdk.common.e.a.a(paramString1, str);
        return str;
    }

    public static String a(Context paramContext, ArrayList paramArrayList, String paramString) {
        String str = com.qihoo.gamecenter.sdk.common.c.e.a(paramContext).a(paramArrayList, paramString);
        return a(paramString, str);
    }

    public static String a(Context paramContext, String paramString, int paramInt) {
        return com.qihoo.gamecenter.sdk.common.c.e.a(paramContext).a(paramString, paramInt);
    }

    public static String b(Context paramContext, String paramString) {
        String str = com.qihoo.gamecenter.sdk.common.c.e.a(paramContext).a(paramString);
        return str;
    }

    private static String a(String paramString1, String paramString2) {
        com.qihoo.gamecenter.sdk.login.plugin.h.e.a("Login.HttpServerAgentImplWrap", new Object[] {
                "removewrap Entry! url= ", paramString1, " res = ", paramString2 });
        try {
            JSONObject localJSONObject = new JSONObject(paramString2);
            int i = localJSONObject.getInt("error_code");
            if (0 == i) {
                String str = localJSONObject.getString("content");
                paramString2 = str;
            }
            else {
                paramString2 = null;
            }
        } catch (Exception localException) {}
        com.qihoo.gamecenter.sdk.login.plugin.h.e.a("Login.HttpServerAgentImplWrap", new Object[] { "final res = ",
                paramString2 });
        return paramString2;
    }
}